﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Text;

namespace ui
{
    public class _fonts
    {
        public static FontFamily LoadFontFamily(string fileName, out PrivateFontCollection fontCollection)
        {
            fontCollection = new PrivateFontCollection();
            fontCollection.AddFontFile(fileName);
            return fontCollection.Families[0];
        }

        public static Font Convert(string filename)
        {
            PrivateFontCollection fonts;
            FontFamily family = LoadFontFamily(filename, out fonts);
            return new Font(family, 8);
        }
    }
}
